-
-
Notifications
You must be signed in to change notification settings - Fork 675
[hl] use classpaths relative_path for get_relative_path #12219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Well, not the best choice because trace depends on it too :') |
IMO all relative paths should always be printed relative to |
But for std and lib it's not relative to |
cde0d56
to
6a031c7
Compare
I'm a bit salty that I open an issue about HL's relative path printing being inferior, and then you open a PR to make other targets behave like HL. x) Relative file paths should be relative to the current working directory because that's the reference point for both users and the IDEs they use. Trimming the relative I really don't understand why anyone would consider this better. |
928f1e7
to
cc8611b
Compare
I took some time to hesitate between make HL behave like others targets / make others target behave like HL. I thought that relative file path is always relative to class paths (the case of std and lib path), that's why at some point I was trying to "fix" it. I apologize for the confusion :/ This PR now only modify HL. |
Additional mini bugs observed:
|
I feel like we wanted to look into something else here but I'm happy to merge this regardless. |
Fixes #12215
CPP does not remove it because there is a bug on the relativePath function used by cpp, wheresrc/
is given as a relative path insideclass_paths
, but the pfile is first turn into absolute path before comparisonhaxe/src/generators/cpp/cppContext.ml
Lines 94 to 96 in c11b679
With this change, hl and cpp share the same relative path function, which ignoresrc/
when there is a-cp src
.Don't know where should I change for jvm though.Use the same relative_path function as hxcpp & trace. This still guarantee relative the same std and lib path. This also fix hl's std relative path detection error (caused by an empty classpath before std).